package com.doform.android.xianggucheng.bean;

import com.bigkoo.pickerview.model.IPickerViewData;

import java.util.List;

/**
 * TODO<json数据源>
 *
 * @author: 小嵩
 * @date: 2017/3/16 15:36
 */

public class IPickerAddressBean implements IPickerViewData {


    /**
     * city : [{"code":1,"name":"北京","zone":[{"code":36,"name":"通州区"},{"code":37,"name":"平谷县"},{"code":38,"name":"顺义区"},{"code":39,"name":"怀柔县"},{"code":40,"name":"密云县"},{"code":41,"name":"延庆县"},{"code":42,"name":"昌平区"},{"code":43,"name":"门头沟区"},{"code":44,"name":"房山区"},{"code":45,"name":"大兴县"},{"code":2328,"name":"北京市区"},{"code":2427,"name":"东城区　"},{"code":2428,"name":"西城区"},{"code":2429,"name":"崇文区"},{"code":2430,"name":"宣武区"},{"code":2431,"name":"朝阳区"},{"code":2432,"name":"海淀区"},{"code":2433,"name":"丰台区"},{"code":2434,"name":"石景山区"}]}]
     * id : 1
     * name : 北京
     */

    private int id;
    private String name;
    private List<CityBean> city;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<CityBean> getCity() {
        return city;
    }

    public void setCity(List<CityBean> city) {
        this.city = city;
    }

    @Override
    public String getPickerViewText() {
        return this.name;
    }

    public static class CityBean implements IPickerViewData{
        /**
         * code : 1
         * name : 北京
         * zone : [{"code":36,"name":"通州区"},{"code":37,"name":"平谷县"},{"code":38,"name":"顺义区"},{"code":39,"name":"怀柔县"},{"code":40,"name":"密云县"},{"code":41,"name":"延庆县"},{"code":42,"name":"昌平区"},{"code":43,"name":"门头沟区"},{"code":44,"name":"房山区"},{"code":45,"name":"大兴县"},{"code":2328,"name":"北京市区"},{"code":2427,"name":"东城区　"},{"code":2428,"name":"西城区"},{"code":2429,"name":"崇文区"},{"code":2430,"name":"宣武区"},{"code":2431,"name":"朝阳区"},{"code":2432,"name":"海淀区"},{"code":2433,"name":"丰台区"},{"code":2434,"name":"石景山区"}]
         */

        private int code;
        private String name;
        private List<ZoneBean> zone;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<ZoneBean> getZone() {
            return zone;
        }

        public void setZone(List<ZoneBean> zone) {
            this.zone = zone;
        }

        @Override
        public String getPickerViewText() {
            return this.name;
        }

        public static class ZoneBean implements IPickerViewData{
            /**
             * code : 36
             * name : 通州区
             */

            private int code;
            private String name;

            public int getCode() {
                return code;
            }

            public void setCode(int code) {
                this.code = code;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            @Override
            public String getPickerViewText() {
                return this.name;
            }
        }
    }
}
